﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CsharpTrainer.Model.Entities;
using CsharpTrainer.Domain.Services;
using Zeus.Thunder.Core;

namespace SharpTrainer.Postgresql
{
    class GetCharacterListTest : ITestCase
    {
        public void Run()
        {
            Console.Write("Please Input the Account Name:");
            string accountName = Console.ReadLine();

            CharacterListService character_service = new CharacterListService();
            IList<AccountCharacter> characterList = character_service.GetCharacterListByAccount(accountName);

            if (characterList != null)
            {
                for (int i = 0; i < characterList.Count; i++ )
                {
                    Console.WriteLine(characterList[i]);
                }

            }
            else
                Console.WriteLine("No this character!");

            Console.Read();
        }
    }
}
